package cn.xuexiyuan.springstudy.core.demo05;


import cn.xuexiyuan.springstudy.core.demo05.service.SequenceGenerator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.xuexiyuan.springstudy.core.demo05");
        System.out.println("Spring 容器加载完成");
        System.out.println("===================");

        System.out.println(context.getBean(SequenceGenerator.class).getSequence());
        System.out.println(context.getBean(SequenceGenerator.class).getSequence());
        System.out.println(context.getBean(SequenceGenerator.class).getSequence());
    }
}
